package com.order.server.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;


public class FeignServiceNameRequestInterceptor implements RequestInterceptor {

    private String serviceName;

    public FeignServiceNameRequestInterceptor(String serviceName) {
        this.serviceName = serviceName;
    }


    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header("serviceName", serviceName);
    }
}
